#ifndef CONTACT_H
#define CONTACT_H

#include <vector>
#include <map>
#include <algorithm>

#include <wx/tokenzr.h>
#include <wx/fileconf.h>

#include "MsnDef.h"

class MsnContact
{
private:
    wxString ID;
    wxString passport;
    wxString name;
    wxString message;
    wxArrayString groupList;
    
    wxString status;
    wxString nickname;

	int listNumber;

    int clientID;

	wxString displayPicture;

	wxString msnObject;

public:
	MsnContact():listNumber(0),clientID(0){}
	~MsnContact(){}

    bool IsOnline();
	bool IsOffLine();

	bool IsInList(int listCode);
	void AddList(int listCode);
	void RemoveList(int listCode);

	wxString GetStatus();

    wxString GetDisplayName();

    bool HasNickname();

    wxString GetFirstGroup();

    wxString GetGroupString();
    void SetGroupString(const wxString& groups);

    void RemoveGroup(const wxString& groupID);
    void AddGroup(const wxString& groupID);

public:
    wxString GetID(){return ID;}
    wxString GetPassport(){return passport;}
    wxString GetName(){return name;}
    wxString GetMesssage(){return message;}
    wxArrayString& GetGroupList(){return groupList;}

    int GetListNumber(){return listNumber;}
    
    wxString GetNickname(){return nickname;}

	wxString GetDisplayPicture(){return displayPicture;}

	wxString GetMsnObject(){return msnObject;}

    void SetID(const wxString& value){ID = value;}
    void SetPassport(const wxString& value){passport = value;}
    void SetName(const wxString& value){name = value;}
    void SetMessage(const wxString& value){message = value;}
    void SetGroupList(const wxArrayString& value){groupList = value;}
    void SetListNumber(int value){listNumber = value;}
    void SetStatus(const wxString& value){status = value;}
    void SetNickname(const wxString& value){nickname = value;}

	void SetDisplayPicture(const wxString& picName){displayPicture = picName;}

	void SetMsnObject(const wxString& value){msnObject = value;}
};

class MsnGroup
{
private:
    wxString ID;
    wxString name;

public:
    MsnGroup(const wxString& groupID, const wxString& groupName):ID(groupID),name(groupName){}
    wxString GetID(){return ID;}
    wxString GetName(){return name;}
    void SetName(const wxString& newName){name = newName;}

    bool operator <(MsnGroup& group) {
        return name.Cmp(group.GetName()) > 0;
    }
};


#endif

